package Work;

public class Worker extends Employee{
    int workingDays;
    double dailyWage;

    Worker(String name,int age,int workingDays,double dailyWage)
    {
        super(name,age);
        this.salary = workingDays * dailyWage;
        this.workingDays= workingDays;
        this.dailyWage = dailyWage;
    }

    @Override
    public void printInfo()
    {
        System.out.println("------员工------");
        super.printInfo();
        System.out.println("工作天数"+this.workingDays);
        System.out.println("日薪"+ dailyWage);
    }
}
